All "Generate test" Snippets
@t
Generate an empty PhpUnit test with the @test
annotation.
<template name="@t" value="/** * @test */ public function $NAME$(): void { $END$ }" description="Add a test function" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP Class Member" value="true" />
</context>
</template>
Live template
@tl
Generate an empty PhpUnit test with the @test
annotation and a fake name.
<template name="@tl" value="/** * @test */ public function TODO_RENAME_$LINE_NUMBER$(): void { $END$ }" description="Add a lazy named test" toReformat="true" toShortenFQNames="true">
<variable name="LINE_NUMBER" expression="lineNumber()" defaultValue="" alwaysStopAt="false" />
<context>
<option name="PHP Class Member" value="true" />
</context>
</template>
Live template
@ts
Generate an empty skipped PhpUnit test with the @test
annotation.
<template name="@ts" value="/** * @test */ public function $NAME$(): void { 	$this->markTestSkipped('Not implemented yet.'); } $END$" description="Add a test function" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP Class Member" value="true" />
</context>
</template>
Live template